package com.syezon.wifikey.home;

import android.content.Context;
import android.content.Intent;

import com.syezon.wifikey.news.ResultInfo;
import com.syezon.wifikey.speed.SpeedTestResult;

public class ResultHelper {

    public static final String ARG_RESULT_INFO = "result_info";

    public static final String ARG_RESULT_TYPE = "result_type";

    public static final String ARG_RESULT_SPEEDTEST = "speedtest_result";
    public static final String ARG_RESULT_SPEEDUP = "speed_up_result";


    public static void showWiFiEnhanceResult(Context context, String ssid) {
        Intent intent = new Intent(context, MainActivity.class);
        intent.putExtra(ARG_RESULT_INFO, new ResultInfo(ResultInfo.RESULT_TYPE_WIFI_ENHANCE, ssid));
        context.startActivity(intent);
    }

    public static void showWiFiSafeResult(Context context) {
        Intent intent = new Intent(context, MainActivity.class);
        intent.putExtra(ARG_RESULT_INFO, new ResultInfo(ResultInfo.RESULT_TYPE_WIFI_SAFE));
        context.startActivity(intent);
    }

    public static void showSpeedTestResult(Context context, SpeedTestResult speedTestResult) {
        Intent intent = new Intent(context, MainActivity.class);
        intent.putExtra(ARG_RESULT_INFO, new ResultInfo(ResultInfo.RESULT_TYPE_SPEEDTEST, speedTestResult));
        context.startActivity(intent);
    }

    public static void showSpeedUpResult(Context context, int add) {
        Intent intent = new Intent(context, MainActivity.class);
        intent.putExtra(ARG_RESULT_INFO, new ResultInfo(ResultInfo.RESULT_TYPE_SPEED_UP, add));
        context.startActivity(intent);
    }

}
